#include <iostream>
#include <thread>

#include "../src/Algorithm/PIDController.cpp"

int main() {
    using std::chrono::milliseconds;
    using std::this_thread::sleep_for;
    const auto instance = std::make_unique<MM::PIDInstance>(1, 0.001, 0, 10000);
    sleep_for(milliseconds(500));
    std::cout << instance->calculate<true>(30, 5000) << std::endl;
    sleep_for(milliseconds(500));
    std::cout << instance->calculate<true>(100, 5000) << std::endl;
    sleep_for(milliseconds(500));
    std::cout << instance->calculate<true>(200, 5000) << std::endl;
    sleep_for(milliseconds(500));
    std::cout << instance->calculate<true>(900, 5000) << std::endl;
    sleep_for(milliseconds(500));
    std::cout << instance->calculate<true>(3600, 5000) << std::endl;
    sleep_for(milliseconds(10000));


    return EXIT_SUCCESS;
}
